# -*- coding: utf-8 -*-
"""
Python代码示例
"""
import demo.cdn.common as common
import time

def analytics_grouptop():
    """
    示例
    """
    path = "v31/yjs/analytics/grouptop"
    params = {}
    params['create_on__gte'] = '2019-11-01T10:00:00Z'
    params['create_on__lt'] = '2019-11-01T13:00:00Z'
    # params['create_on__gte'] = '2021-3-24T06:00:00Z'
    # params['create_on__lt'] = '2021-3-24T08:00:00Z'
    # params['domain'] = common.domain
    params['domain'] = common.domainProfessin
    params['field'] = 'waf_region'
    params['ztype'] = 'zone'
    params['interval'] = 'day'

    payload = {}

    headers = common.get_request_header(path, params, payload)

    url = common.OPENAPI_BASE_URL % path

    response = common.send_http_request("GET", url, params=params, payload=payload, headers=headers)

if __name__ == '__main__':
    analytics_grouptop()